package com.ruoyi.project.express.accounts.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import java.util.Date;

/**
 * 物流账号对象 express_accounts
 * 
 * @author lindor
 * @date 2020-04-07
 */
public class ExpressAccounts extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long partnerId;

    /** 商家名称 */
    @Excel(name = "商家名称")
    @NotEmpty(message = "商家名称不能为空")
    private String partnerName;

    /** 商家编码 */
    @Excel(name = "商家编码")
    @NotEmpty(message = "商家编号不能为空")
    private String partnerCode;

    /** 应用编码 */
    @Excel(name = "应用编码")
    private String appCode;

    /** 用户Key */
    @Excel(name = "用户Key")
    private String appKey;

    /** 用户密钥 */
    @Excel(name = "用户密钥")
    private String appSecret;

    /** 有效token */
    @Excel(name = "有效token")
    private String accessToken;

    /** token最大有效时间 */
    @Excel(name = "token最大有效时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date maxValidTime;

    /** API请求访问地址 */
    @Excel(name = "API请求访问地址")
    private String apiUrl;

    /** 频次，单位小时 */
    @Excel(name = "频次，单位小时")
    private Long synTimes;

    /** 一天有效结束时间 */
    @Excel(name = "一天有效结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date synStartTime;

    /** 一天有效结束时间 */
    @Excel(name = "一天有效结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date synEndTime;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    public void setPartnerId(Long partnerId) 
    {
        this.partnerId = partnerId;
    }

    public Long getPartnerId() 
    {
        return partnerId;
    }
    public void setPartnerName(String partnerName) 
    {
        this.partnerName = partnerName;
    }

    public String getPartnerName() 
    {
        return partnerName;
    }
    public void setPartnerCode(String partnerCode) 
    {
        this.partnerCode = partnerCode;
    }

    public String getPartnerCode() 
    {
        return partnerCode;
    }
    public void setAppCode(String appCode) 
    {
        this.appCode = appCode;
    }

    public String getAppCode() 
    {
        return appCode;
    }
    public void setAppKey(String appKey) 
    {
        this.appKey = appKey;
    }

    public String getAppKey() 
    {
        return appKey;
    }
    public void setAppSecret(String appSecret) 
    {
        this.appSecret = appSecret;
    }

    public String getAppSecret() 
    {
        return appSecret;
    }
    public void setAccessToken(String accessToken) 
    {
        this.accessToken = accessToken;
    }

    public String getAccessToken() 
    {
        return accessToken;
    }
    public void setMaxValidTime(Date maxValidTime) 
    {
        this.maxValidTime = maxValidTime;
    }

    public Date getMaxValidTime() 
    {
        return maxValidTime;
    }
    public void setApiUrl(String apiUrl) 
    {
        this.apiUrl = apiUrl;
    }

    public String getApiUrl() 
    {
        return apiUrl;
    }
    public void setSynTimes(Long synTimes) 
    {
        this.synTimes = synTimes;
    }

    public Long getSynTimes() 
    {
        return synTimes;
    }
    public void setSynStartTime(Date synStartTime) 
    {
        this.synStartTime = synStartTime;
    }

    public Date getSynStartTime() 
    {
        return synStartTime;
    }
    public void setSynEndTime(Date synEndTime) 
    {
        this.synEndTime = synEndTime;
    }

    public Date getSynEndTime() 
    {
        return synEndTime;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("partnerId", getPartnerId())
            .append("partnerName", getPartnerName())
            .append("partnerCode", getPartnerCode())
            .append("appCode", getAppCode())
            .append("appKey", getAppKey())
            .append("appSecret", getAppSecret())
            .append("accessToken", getAccessToken())
            .append("maxValidTime", getMaxValidTime())
            .append("apiUrl", getApiUrl())
            .append("synTimes", getSynTimes())
            .append("synStartTime", getSynStartTime())
            .append("synEndTime", getSynEndTime())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
